@@ -70,7 +70,7 @@ class TestPkgMogrify(pkg5unittest.CliTestCase):
70
70
"""
71
71
72
72
pkgcontents2 = """\
73
- set name=pkg.fmri value=wombat/[email protected] ,5.11-0.101
73
+ set name=pkg.fmri value=pkg://tp/ wombat/[email protected] ,5.11-0.101
74
74
set name=bugs value=12345 value=54321 value=13524
75
75
set name=justonebug value=12345
76
76
file thisismyhashvalue path=usr/bin/foo mode=0777 owner=root group=bin
@@ -111,6 +111,7 @@ class TestPkgMogrify(pkg5unittest.CliTestCase):
111
111
"exit7 on bobcat" : "<transform file bobcat=1 -> exit 7>" ,
112
112
"exit6 on bobcat" : "<transform file bobcat=1 -> exit 6 found a bobcat>" ,
113
113
"pkg.fmri" : '<transform file path=usr/bin/foo -> print pkg attr "%{{pkg.fmri}}" and the rest>' ,
114
+ "pkg.fmri.name" : '<transform file path=usr/bin/foo -> print pkg attr "%{{pkg.fmri.name}}" and the rest>' ,
114
115
"pkg.bugs" : '<transform file path=usr/bin/foo -> print pkg attr "%{{bugs}}" and the rest>' ,
115
116
"fmrival" : '<transform set name=pkg.fmri -> print test of "%(value)" ... or is it?>' ,
116
117
"fmrinoval" : '<transform set name=pkg.fmri -> print test of "%(valuee)" ... or is it?>' ,
@@ -527,7 +528,7 @@ def test_11(self):
527
528
# ... or an action ...
528
529
self .pkgmogrify ([self .transforms ["emitaction" ], source_file ])
529
530
self .assertMatch (
530
- "^depend fmri=wombat/[email protected] ,5.11-0.101 type=incorporate"
531
+ "^depend fmri=pkg://tp/ wombat/[email protected] ,5.11-0.101 type=incorporate"
531
532
)
532
533
533
534
# Recursive transforms shouldn't blow up.
@@ -550,7 +551,7 @@ def test_12(self):
550
551
source_file = os .path .join (self .test_root , "source_file2" )
551
552
552
553
expect = r'^test of "{0}" ... or is it\?$'
553
- fmri = "wombat/[email protected] ,5.11-0.101"
554
+ fmri = "pkg://tp/ wombat/[email protected] ,5.11-0.101"
554
555
555
556
# Simple %() replacement
556
557
self .pkgmogrify ([self .transforms ["fmrival" ], source_file ])
@@ -625,9 +626,12 @@ def test_13(self):
625
626
# Simple valued
626
627
self .pkgmogrify ([self .transforms ["pkg.fmri" ], source_file ])
627
628
self .assertMatch (
628
- '^pkg attr "wombat/[email protected] ,5.11-0.101" and ' "the rest$"
629
+ '^pkg attr "pkg://tp/ wombat/[email protected] ,5.11-0.101" and ' "the rest$"
629
630
)
630
631
632
+ self .pkgmogrify ([self .transforms ["pkg.fmri.name" ], source_file ])
633
+ self .assertMatch ('^pkg attr "wombat/heaven" and ' "the rest$" )
634
+
631
635
# List valued
632
636
self .pkgmogrify ([self .transforms ["pkg.bugs" ], source_file ])
633
637
self .assertMatch ('^pkg attr "12345 54321 13524" and the rest$' )
0 commit comments