SF.net SVN: gar:[23266] csw/mgar/gar/v2/src/catalog-release-to-disk.go
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Mar 23 15:20:42 CET 2014
Revision: 23266
http://sourceforge.net/p/gar/code/23266
Author: wahwah
Date: 2014-03-23 14:20:40 +0000 (Sun, 23 Mar 2014)
Log Message:
-----------
cat-gen: Use a function to map to long osrels
Modified Paths:
--------------
csw/mgar/gar/v2/src/catalog-release-to-disk.go
Modified: csw/mgar/gar/v2/src/catalog-release-to-disk.go
===================================================================
--- csw/mgar/gar/v2/src/catalog-release-to-disk.go 2014-03-21 19:25:19 UTC (rev 23265)
+++ csw/mgar/gar/v2/src/catalog-release-to-disk.go 2014-03-23 14:20:40 UTC (rev 23266)
@@ -277,6 +277,14 @@
return strings.Replace(longosrel, "SunOS", "", -1)
}
+func longOsrel(shortosrel string) string {
+ if strings.HasPrefix(shortosrel, "SunOS") {
+ return shortosrel
+ } else {
+ return fmt.Sprintf("SunOS%s", shortosrel)
+ }
+}
+
// Defines layout of files on disk. Can be built from the database or from
// disk.
type FilesOfCatalog map[CatalogSpec]map[string]LinkOnDisk
@@ -397,7 +405,7 @@
log.Println("Wrong path found:", fields)
}
arch := fields[0]
- osrel := fmt.Sprintf("SunOS%s", fields[1])
+ osrel := longOsrel(fields[1])
basename := fields[2]
catspec := CatalogSpec{catrel, arch, osrel}
// Figuring out the file type: hardlink/symlink
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list