[Apt-zip-devel] apt-zip

Giacomo A. Catenazzi cate at debian.org
Wed Jun 13 13:18:57 UTC 2007


François Févotte wrote:
> Hello Giacomo and Eddy!
> 
> I'm sorry to bother you again, but I never received any answer to my
> last e-mail about the "update" feature for apt-zip. I think this
> feature will be very appreciated by apt-zip users, which is why I'm a
> bit insistant about it.

Sorry, i forgot about it.

I'll review it next week
(I'll be in DebConf, so with enough time for debian ;-) )

For upload: if you send me a complete patch, I can upload
it. I've still some problem with svn.

For sponsored upload, it would take to much time to the other DD.
There were already some abuse (some DDs didn't check carefully
the quality of upload), so we risk some new policy of sponsoring.


ciao
	cate


> 
> I understand you have very little time to devote to apt-zip, but if
> you could just review it a last time and give me your leave to upload
> it, I'm sure I can find a sponsor to upload the new version (or maybe
> you Giacomo could do it...). If there are still some modifications in
> the code that you would like me to do, please don't hesitate to let me
> know.
> 
> Also, if you authorize me to put myself in the uploaders field, I
> could help you maintaining the package if you need to.
> 
> Sorry again for bothering you with this,
> 
>    François
> 
> On 4/11/07, François Févotte <francois.fevotte at ensta.org> wrote:
>> Hello,
>>
>> thanks for having taken the time to examine my patch. Below are my
>> answers to your comments.
>>
>> On 4/11/07, Giacomo A. Catenazzi <cate at debian.org> wrote:
>> > > +if [ -r "${MEDIUM}/${APTZIPTARFILE}" ]
>> > > +then
>> > > +    EXTRACTDIR=/var/cache/apt/archive
>> > > +    [ "$APTGETACTION" = "update" ] && EXTRACTDIR=/var/lib/apt/lists
>> > > +
>> > > +    echo >&2 "Unpacking tarball..."
>> > > +    ( cd $EXTRACTDIR ; tar xf ${MEDIUM}/${APTZIPTARFILE} )
>> >
>> > I don't like it ;-) To write fewer line, you complicate the scripts.
>> > I think that you should mode the "EXTRACTDIR=/var/lib/apt/lists"
>> > in after the next "if" statment, change the option of tar in
>> > the if statment with "xvf" ( I don't know if "xtf" works),
>> > and put this unpacking in a new "if action not update".
>>
>> I am not sure I understand what you propose. Would you like it better 
>> this way:
>>
>> +if [ -r "${MEDIUM}/${APTZIPTARFILE}" ]
>> +then
>> +    if [ "$APTGETACTION" = "update" ]
>> +    then
>> +        EXTRACTDIR=/var/lib/apt/lists
>> +        echo >&2 "Uncompressing index archives..."
>> +        (
>> +            cd $EXTRACTDIR
>> +            tar xvf ${MEDIUM}/${APTZIPTARFILE} |
>> +            while read FILE
>> +            do
>> +              [ `basename $FILE .bz2` != "$FILE" ] && bunzip2 -f $FILE
>> +              [ `basename $FILE .gz`  != "$FILE" ] && gunzip -f $FILE
>> +            done
>> +            rm -f foo-stamp
>> +        )
>> +    else
>> +        EXTRACTDIR=/var/cache/apt/archive
>> +        echo >&2 "Unpacking tarball..."
>> +        ( cd $EXTRACTDIR ; tar xvf ${MEDIUM}/${APTZIPTARFILE} )
>> +    fi
>> +else
>> +    [ "$APTGETACTION" = "update" ] \
>> +        && echo "Error: the \`tar' option should be set when using" \
>> +                "\`--aptgetaction update'" \
>> +        && exit 1
>> +    APTGETCACHE="-o dir::cache::archives=${MEDIUM}"
>> +fi
>>
>>
>>
>> > > +              [ `basename $FILE .bz2` != "$FILE" ] && bunzip2 -f 
>> $FILE
>> > > +              [ `basename $FILE .gz`  != "$FILE" ] && gunzip -f 
>> $FILE
>> >
>> > I don't understand this.
>>
>> basename removes the given suffix from the filename. If the result of
>> basename is different from the filename, it means that the given
>> suffix was present at the end of the filename.
>>
>> > if $FILE ends with ".gz", the first condition is true and it will try
>> > to extract as bzip2 the .gz file.
>>
>> No, if $FILE ends with ".gz", then basename can't remove a ".bz2"
>> suffix, so that `basename $FILE .bz2` is equal to $FILE.
>>
>> > I think you should do:
>> >         [ `basename $FILE .bz2`.bz2 = "$FILE" ] && bunzip2 -f $FILE
>> > or probably a grep is simpler:
>> >         echo "$FILE" | grep -sqe '.bz2$' -  &&  bunzip2 -f "$FILE"
>> > BTW I will quote the "$FILE".
>>
>> You're right. Maybe grep is simpler... And quoting the arguments never 
>> hurts! :)
>>
>>
>>
>> > > +            rm -f foo-stamp
>> > ? who created this file?
>>
>> It is the first file inserted into the archive to create it in 
>> `methods/wget':
>>      touch foo-stamp && "$OPTION_TAR" cf "$APTZIPTARFILE" foo-stamp &&
>> rm foo-stamp
>>
>>
>>
>> > Now that etch is released, we can upload a new testing version!
>>
>> That would be a good thing in my opinion.
>>
>>
>>
>> > perl? ;-)
>>
>> Didn't I tell you I like perl? ;)
>>
>> > I prefer sed:
>> > sed -nre "s/\.(bz2|gz)$/ /pg" -
>>
>> Can sed do the modifications in place (like with "perl -i" does)? Or
>> do we have to use yet another temporary file to put the result of sed?
>>
>> > but ok if you like perl. But maybe you should add "$" at the end
>> > of match expression.
>>
>> No, because the ".(bz2|.gz)" occurs at the end of a word, but not at
>> the end of a line.
>>
>> Attached is a new patch taking into account your first comment on
>> apt-zip-inst. I also added a list of Closed bugs in the
>> debian/changelog file, in case you would release this version.
>>
>> Please don't hesitate to ask me other modifications to the code
>> (although I will be away from April 13th to April 22nd, so that I
>> won't be able to answer you before the week after the next).
>>
>> Thanks,
>>    François
>>
>>




More information about the apt-zip-devel mailing list