[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Small patch to pkg
From: |
David Bateman |
Subject: |
Re: Small patch to pkg |
Date: |
Tue, 12 Sep 2006 11:38:11 +0200 |
User-agent: |
Thunderbird 1.5.0.5 (X11/20060817) |
David Bateman wrote:
> May I suggest the attached small patch to pkg.m. Basically, it disallows
> bundles of packages in a single tar-ball as this removes any possibility
> of doing dependency checking. It also expands the error message for the
> non correspondence of package name to the archive name. This was helpful
> for me when debugging octave-forge packages, and will be helpful in the
> future when debugging installations of multiple packages at the same time..
>
> Regards
> David
>
>
With the patch this time..
D.
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
*** scripts/pkg/pkg.m.orig 2006-08-30 21:40:17.723849280 +0200
--- scripts/pkg/pkg.m 2006-09-12 11:33:59.886995040 +0200
***************
*** 157,162 ****
--- 157,166 ----
if (err)
error("Couldn't read directory produced by tar: %s\n", msg);
endif
+
+ if (length(dirlist) > 3)
+ error("Bundles of packages are not allowed")
+ endif
for k = 3:length(dirlist) # the two first entries of dirlist are
"." and ".."
packdir = [tmpdir "/" dirlist{k} "/"];
***************
*** 173,179 ****
[dummy, nm] = fileparts(tgz);
if ((length(nm) >= length(desc.name)) &&
! strcmp(desc.name,nm(1:length(desc.name))))
! error("Package name doesn't correspond to its filename");
endif
## Set default installation directory
--- 177,184 ----
[dummy, nm] = fileparts(tgz);
if ((length(nm) >= length(desc.name)) &&
! strcmp(desc.name,nm(1:length(desc.name))))
! error(["Package name '",desc.name,"' doesn't correspond",
! "to its filename '",nm,"'"]);
endif
## Set default installation directory