[ubuntu-za] dpkg-scanpackages - mydebs

Johan johansche at telkomsa.net
Mon Feb 22 19:38:55 GMT 2010


Adrian Moisey wrote:
> Hi
>
>   
>> I have done this exactly as per instruction to create a personal
>> repository.
>>
>> This is the command and its output
>>
>> laptop:/usr/local/mydebs$ sudo dpkg-scanpackages . /dev/null | gzip -9c
>>  > Packages.gz
>> bash: Packages.gz: Permission denied
>>     
>
> gzip can't write to that directory. The reason is because
> dpkg-scanpackages is running as root (from the sudo) but gzip is
> running as your current user, which doesn't have write access to that
> directory.
>
> Try:
> sudo -i
> cd /usr/local/mydebs
> dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
>
> There may be a better way to do that though.
>
> Adrian
>
> Thanks for the pointers. This did not work but put me in some thinking.
After some trial and error this now works..but creates Package.gz in my 
home/johan dir
sudo dpkg-scanpackages /usr/local/mydebs /dev/null | gzip -9c > Packages.gz

sudo rsync -av /home/johan/Packages.gz /usr/local/mydebs/

Goodnight
Johan Sch



More information about the ubuntu-za mailing list