[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Small [patch] (install_depends) and should I apply it?



Ian Lynagh <igloo@earth.li> writes:

> I've just started looking at the boot floppies and I am unclear on this.
> As a Debian developer to I have write access to the CVS repository, and
> if so, should I send patches here or apply them myself?

If there is any doubt, you should send patches here for review.

In this case, I'm glad you sent it here for review first.

> I have attached a patch that creates an install_depends to complement
> check_depends, as well as laying the code out slightly more clearly.
> +	   $$_=`sed -n s/^Depends://Ip debian/control`."$(depends_checks)"; \

Shouldn't we be looking at Build-Depends now?  Actually, they are the
same...  I'm not really sure...


> +	   $$/="\n\n"; y/,/ /; s/\(.*?\)//g; @M{split()}=""; \
> +	   while (<>) { \
>  	     /^Status: \S+ \S+ installed$$/ms or next; \
>  	     delete $$M{$$1} if /^Package: (\S+)/ms; \
>  	     delete @M{split(/ *, */,$$1)} if /^Provides: (.+?)$$/ms; \
> -	   } foreach my $$m (keys %M) { print "  didn'\''t find $$m\n" } \
> -	   exit 1 if %M' /var/lib/dpkg/status
> +	   } \
> +	   my @to_install; \
> +	   my $$package; \
> +	   foreach my $$m (keys %M) { \
> +	       print "  didn'\''t find $$m\n"; \
> +	       if ($$install_missing) { \
> +	           ($$package = $$m) =~ s/glibc-pic/libc6-pic/; \
> +	           push @to_install, $$package; \

Um, this is not kosher.  Why are you replacing glibc-pic with
libc6-pic?  That will break on alpha.  Don't do that.

> +	       } \
> +	   } \
> +	   if (%M) { \
> +	       unshift @to_install, "apt-get", "install"; \
> +	       unshift @to_install, "$(ROOTCMD)" if "$(ROOTCMD)"; \
> +	       exit system(@to_install) >> 8 \
> +	           if $$install_missing; \

Woah woah woah... do *not* start installing packages -- you have to
assume this is being run as a user, not root.

Perhaps it would be good to emit the apt-get install cmdline they need
to run.  But do *not* just run it...

Or am I misreading this?

-- 
.....Adam Di Carlo....adam@onshore.com.....<URL:http://www.onshored.com/>



Reply to: