]> pd.if.org Git - zpackage/commitdiff
fix pkginfo and list files in package
authorNathan Wagner <nw@hydaspes.if.org>
Fri, 14 Sep 2018 04:45:47 +0000 (04:45 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Fri, 14 Sep 2018 04:45:47 +0000 (04:45 +0000)
zpm-pkginfo

index 3be0e03afc31389643de272ccd6f7235034bf392..daef64246f8223b8e0d591fc91adf37ba85e009d 100755 (executable)
@@ -62,24 +62,26 @@ EOS
 
 #mode user group hash mtime csvtags path
 
-sqlite3 $pkgfile <<-EOS
-.header on
+zpm shell $pkgfile <<-EOS
+.header off
 select
-       printf('%s %s %s %s %s %s',
+       printf('%s %s %s %s %s %s %s',
        F.mode, F.username, F.groupname,
        case when F.filetype = 'c' then
                F.devmajor || ',' || F.devminor
+       when F.filetype = 'd' then
+               'directory'
        else
                F.hash
        end 
        ,strftime('%Y-%m-%dT%H:%M:%S', F.mtime, 'unixepoch')
-       , T.tags
+       , coalesce(T.tags, '-')
        ,F.path)
 from packagefiles as F
 left join (
        select TG.package, TG.version, TG.release, TG.path
-       ,coalesce(group_concat(tag), '-') as tags
-       from packagefiletags TG
+       ,group_concat(tag) as tags
+       from pathtags TG
        group by package, version, release, path
 ) T
 on T.package = F.package and T.version = F.version and T.release = F.release