[sabayon] ZIP actually contains the permissions!?

[root newcaprica tmp]# mkdir test3

[root newcaprica tmp]# cd test3

[root newcaprica test3]# unzip /etc/sabayon/profiles/test3.zip
Archive:  /etc/sabayon/profiles/test3.zip
 extracting: metadata
 extracting: 664
 extracting: 777
 extracting: 600

[root newcaprica test3]# ls -l ???
-rw-------. 1 root root 0 2010-02-16 00:27 600
-rw-rw-r--. 1 root root 0 2010-02-16 00:26 664
-rwxrwxrwx. 1 root root 0 2010-02-16 00:26 777

I just spent way too much time figuring out where to properly hook into Sabayon the code to save the stat() mode to the XML metadata. Then when I go to test it, I find that unzip somehow restored the files to the original UNIX permissions that I saved in the profile.

I thought ZIP couldn't encode UNIX permissions?

It seems python's zipfile contains many functions that didn't exist until python-2.6, so I can't safely rely on zipfile's behavior and I should proceed with implementing encoding of permissions in the XML metadata as planned.


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